<include file="public:header" />
  <link rel="stylesheet" type="text/css" href="http://o9kxq6gms.bkt.clouddn.com/js_source/artdialog/plugins/skins/idialog.css" />
         <script type="text/javascript" charset="UTF-8" src="http://o9kxq6gms.bkt.clouddn.com/js_source/artdialog/artDialog.source.js.js"></script>
<script type="text/javascript" charset="UTF-8" src="http://o9kxq6gms.bkt.clouddn.com/js_source/artdialog/plugins/iframeTools.source.js"></script>
<style>
    .global-pages {
  float: right;
}
</style>
<div id="bd">
    <div class="layout grid-s45m0 w1000 user-center">
        <div class="col-main">
            <div class="main-wrap">
				<div class="box J_TBox">
					<div class="global-title">消费明细
					
					</div>
				</div>
			

                <div class="box J_TBox">
					<table cellpadding="0" cellspacing="0" class="server-content table-list" style="margin-bottom:10px;">
                    <tr class="title">
                <th ><span data-tdtype="order_by" data-field="id">ID</span></th>
                <th >头像</th>
				<th align="left"><span data-tdtype="order_by" data-field="username">会员帐号</span></th>
                <th align="left" ><span data-tdtype="order_by" data-field="tele">交易总额</span></th>
                <th><span data-tdtype="order_by" data-field="status">状态</span></th>
                <th width="120">操作</th>
            </tr>
        <volist name="list" id="val">
            <tr class="list">
                <td align="center">{$val.id}</td>
                <td align="center"><img src="{:avatar($val['img'], 32)}" width="32" /></td>
                <td align="left">{$val.username}</td>
                <td>{$val.order_total}</td>
                <td align="center"><if condition="$val.status eq 0">停用<else/>启用</if></td>
               <td align="center">
                <a href="{:U('user/order',array('id'=>$val[id]))}">查看消费流水</a> 
                <br>
					

                </td>
            </tr>
						</volist>
					</table>
                </div>
             

				<div class="box J_TBox">
					<div class="global-pages">
						<span class="num">
							{$page}
						</span>
					</div>
				</div>
            </div>
        </div>
        <include file="user:left" />
    </div>
</div>
<!--主部结束-->
<script type="text/javascript" src="http://web.mcooz.com/js/jquery-1.11.1.min.js"></script>
<script>
function agent(id){
    
    
    html='<table class="table_form"width="100%"><tbody><tr><th>返佣比例：</th><td><input name="commission" id="commission"  class="input-text"  value="" size="30" type="text">%</td></tr></tbody></table>';
  
          var dialog = art.dialog({
                title: '经纪人审核',
                content: html,
                icon: 'succeed',
                okVal: '确定',
                cancel: true,
                ok: function(){
                    var commission = document.getElementById('commission');
                    
                  
                       if (commission.value=='') {
                        
                        alert("请输入返佣比例");
                        
                        return false;
                        
                    }
                    if (commission.value>2) {
                        
                        alert("返佣比例不能超过2%");
                        
                        return false;
                        
                    }
                        var url = 'http://101.201.73.190/lib/weitang/index.php/?g=team&m=user&a=agent_act';
                    $.getJSON(url, {'id': id,'commission':commission.value}, function (json)
                    {
                        
                      if(json.status==1){
                       // var status= document.getElementById('status_'+id);
                        //status.innerHTML ="已审核";
                        //$("#status_"+id).html("_blank");
                       alert(json.message);
                          $('#status_'+id).html("已审核");
                          window.location.reload();
                       
                        
                        return false;
                        }
                        
                        alert(json.message);
                        
                        
                    }               
                     );
                return false;
                }
                });
}
</script>
<include file="public:footer" />